/PROG  PNS0029
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "VE21-4542-4543";
PROG_SIZE	= 3366;
CREATE		= DATE 24-05-23  TIME 16:03:08;
MODIFIED	= DATE 25-06-10  TIME 09:45:54;
FILE_NAME	= PNS0027;
VERSION		= 0;
LINE_COUNT	= 119;
MEMORY_SIZE	= 3826;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R23 ;
   6:  !  PROGRAM: PNS0041 ;
   7:  !  PART:53338597/8598 ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  OVERRIDE=20% ;
  12:  MOVE TO HOME    ;
  13:  R[14]=90    ;
  14:  R[18]=1    ;
  15:  R[19]=.1    ;
  16:   ;
  17:  !------------------------------- ;
  18:  !BEGINNING OF PROGRAM ;
  19:  CALL PARTDROP    ;
  20:  COL GUARD ADJUST R[14] ;
  21:  UTOOL_NUM=1 ;
  22:  UFRAME_NUM=0 ;
  23:  PAYLOAD[3] ;
  24:  R[5]=10    ;
  25:  OVERRIDE=R[5] ;
  26:  !INITIATE TO PICK-POUNCE ;
  27:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  28:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  29:  R[1]=0    ;
  30:  TIMER[1]=RESET ;
  31:  TIMER[1]=START ;
  32:   ;
  33:  LBL[10:TOP OF LOOF] ;
  34:  OVERRIDE=R[5] ;
  35:   ;
  36:  TIMER[3]=STOP ;
  37:  TIMER[2]=STOP ;
  38:  R[1]=R[1]+1    ;
  39:  R[2]=TIMER[2]    ;
  40:  R[3]=60/R[2]    ;
  41:  R[8]=TIMER[3]    ;
  42:  TIMER[2]=RESET ;
  43:  TIMER[2]=START ;
  44:  TIMER[3]=RESET ;
  45:   ;
  46:  !PROCEED TO PICK ;
  47:  LBL[20] ;
  48:  IF DI[1]=ON AND DI[3]=ON AND DI[8]=ON,JMP LBL[25] ;
  49:  IF DI[29]=ON,JMP LBL[90] ;
  50:  JMP LBL[20] ;
  51:   ;
  52:  LBL[25] ;
  53:  WAIT DI[1]=ON AND DI[3]=ON AND DI[8]=ON    ;
  54:  R[5]=100    ;
  55:  OVERRIDE=R[5] ;
  56:  TIMER[3]=START ;
  57:J P[3:PICK APPROACH] 100% CNT80 ACC100    ;
  58:   ;
  59:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  60:  PAYLOAD[4] ;
  61:  CALL CHK_PICK    ;
  62:  MONITOR Z_CHECH ;
  63:J P[5:PICK DEPART] 100% CNT60 ACC100    ;
  64:  LBL[27] ;
  65:  CALL CHECKPICK    ;
  66:  IF DI[9]=OFF OR DI[11]=OFF,JMP LBL[27] ;
  67:   ;
  68:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  69:  DO[5]=PULSE,1.0sec ;
  70:  DO[8]=PULSE,1.0sec ;
  71:  LBL[30:GOTO DROP POUNCE] ;
  72:J P[8:DROP POUNCE] 100% CNT100 ACC100 BREAK    ;
  73:  TIMER[3]=STOP ;
  74:  LBL[40:AT DROP POUNCE] ;
  75:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  76:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  77:  IF DI[18]=ON,JMP LBL[60] ;
  78:  JMP LBL[40] ;
  79:   ;
  80:  LBL[50:MOVE DROP SNEAK] ;
  81:  TIMER[3]=START ;
  82:  OVERRIDE=R[5] ;
  83:J P[9:DROP SNEAK] 100% CNT100 ACC100 BREAK    ;
  84:  LBL[51:DROP OR C-P-S] ;
  85:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  86:  IF DI[18]=ON,JMP LBL[40] ;
  87:  JMP LBL[51] ;
  88:  JMP LBL[50] ;
  89:   ;
  90:  LBL[60:MOVE CLS-PRS-ACC] ;
  91:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  92:  PAUSE ;
  93:  JMP LBL[30] ;
  94:   ;
  95:  LBL[80:DROP ENABLED] ;
  96:  !PROCEED TO DROP ;
  97:  TIMER[3]=START ;
  98:  OVERRIDE=R[5] ;
  99:J P[10:DROP APPROACH] 100% CNT50 ACC100    ;
 100:  MONITOR END Z_CHECH ;
 101:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100    ;
 102:  PAYLOAD[3] ;
 103:  CALL CHK_DROP    ;
 104:   ;
 105:J P[12:DROP DEPART] 100% CNT100 ACC130 TA   0.00sec,DO[7]=PULSE,1.0sec    ;
 106:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 107:  DO[6]=PULSE,1.0sec ;
 108:  !GOTO PICK POUNCE ;
 109:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 110:  IF DI[29]=ON,JMP LBL[90] ;
 111:  JMP LBL[10] ;
 112:   ;
 113:  LBL[90:END OF CYCLE] ;
 114:  TIMER[1]=STOP ;
 115:  R[4]=TIMER[1]    ;
 116:J P[1:MIDDLE] 50% CNT100    ;
 117:  MOVE TO HOME    ;
 118:   ;
 119:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.455  mm,	Y =     -.007  mm,	Z = -1146.840  mm,
	W =   180.000 deg,	P =      .000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2070.993  mm,	Y =  1373.140  mm,	Z = -1023.424  mm,
	W =   179.437 deg,	P =      .372 deg,	R =   154.745 deg,
	E1=   131.299 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2624.823  mm,	Y =  3273.502  mm,	Z = -1006.060  mm,
	W =   178.846 deg,	P =      .130 deg,	R =    91.167 deg,
	E1=   105.345 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2624.823  mm,	Y =  3273.502  mm,	Z = -1162.938  mm,
	W =   178.846 deg,	P =      .130 deg,	R =    91.167 deg,
	E1=   105.345 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2624.823  mm,	Y =  3273.502  mm,	Z = -1006.060  mm,
	W =   178.846 deg,	P =      .130 deg,	R =    91.167 deg,
	E1=   105.345 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2136.891  mm,	Y =  1696.934  mm,	Z = -1006.032  mm,
	W =   179.324 deg,	P =      .173 deg,	R =   142.422 deg,
	E1=   143.568 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2079.908  mm,	Y = -1198.236  mm,	Z =  -966.628  mm,
	W =  -179.889 deg,	P =      .496 deg,	R =  -152.637 deg,
	E1=    78.878 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2340.297  mm,	Y = -1818.127  mm,	Z =  -994.471  mm,
	W =  -179.658 deg,	P =      .229 deg,	R =  -107.143 deg,
	E1=   116.186 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2659.954  mm,	Y = -3276.316  mm,	Z = -1079.576  mm,
	W =  -179.860 deg,	P =    -1.446 deg,	R =   -91.637 deg,
	E1=   107.354 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2659.954  mm,	Y = -3276.317  mm,	Z = -1178.456  mm,
	W =  -179.860 deg,	P =    -1.446 deg,	R =   -91.637 deg,
	E1=   107.354 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2659.954  mm,	Y = -3276.316  mm,	Z = -1111.416  mm,
	W =  -179.860 deg,	P =    -1.446 deg,	R =   -91.637 deg,
	E1=   107.354 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2117.198  mm,	Y = -1520.904  mm,	Z = -1061.632  mm,
	W =  -179.803 deg,	P =      .452 deg,	R =  -145.629 deg,
	E1=    71.834 deg
};
/END
